package com.itheima.service;

import com.itheima.dao.EmployeeDao;
import com.itheima.domain.Employee;
import com.itheima.vo.DepartAndSalaryVo;
import com.itheima.vo.SexAndSalaryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author itheima
 */
@Service("employeeService")
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeDao employeeDao;

    public List<Employee> getAll(Integer page, Integer pageSize) {
        return employeeDao.getAll();
    }

    public List<Employee> getBySalaryAndSex() {
        return employeeDao.getBySalaryAndSex();
    }

    public List<Employee> getByBirthday() {
        return employeeDao.getByBirthday();
    }

    public List<SexAndSalaryVo> getSum() {
        return employeeDao.getSum();
    }

    public List<DepartAndSalaryVo> getDepartment() {
        return employeeDao.getDepartment();
    }

    public List<String> getByName() {
        return employeeDao.getByName();
    }
}
